<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="en">
	<head>
		<meta charset="utf-8">
		<title>题目详情</title>
		<link href="css/app.css" rel="stylesheet">
		<link rel="stylesheet" href=""/>
		<link rel="stylesheet" href="../../static/css/questionbank/qbdetail.css"/>
	</head>
	<body>
		<div class="wrapper">
			<nav id="sidebar" class="sidebar js-sidebar">
				<div class="sidebar-content js-simplebar">
					<a class="sidebar-brand" href="index.html">
		      <span class="align-middle">AdminKit</span>
		    </a>
		
					<ul class="sidebar-nav">
						<li class="sidebar-header">
							Pages
						</li>
						<li class="sidebar-item">
							<a class="sidebar-link" href="pages-profile.html">
								<i class="align-middle" data-feather="user"></i> <span class="align-middle">Profile</span>
						</a>
						</li>
						<li class="sidebar-item">
									<a class="sidebar-link" href="charts-chartjs.html">
						  <i class="align-middle" data-feather="bar-chart-2"></i> <span class="align-middle">Charts</span>
						</a>
								</li>
						
								<li class="sidebar-item">
									<a class="sidebar-link" href="maps-google.html">
						  <i class="align-middle" data-feather="map"></i> <span class="align-middle">Maps</span>
						</a>
								</li>
					</ul>
				</div>
			</nav>
		
			<div class="main">
				<nav class="navbar navbar-expand navbar-light navbar-bg">
					<a class="sidebar-toggle js-sidebar-toggle">
						<i class="hamburger align-self-center"></i>
					</a>
		
					<div class="navbar-collapse collapse">
						<ul class="navbar-nav navbar-align">
							<li class="nav-item dropdown">
								<a class="nav-icon dropdown-toggle d-inline-block d-sm-none" href="#" data-bs-toggle="dropdown">
									<i class="align-middle" data-feather="settings"></i>
								</a>
		
								<a class="nav-link dropdown-toggle d-none d-sm-inline-block" href="#" data-bs-toggle="dropdown">
									<i class="align-middle me-2" data-feather="feather"></i>
									<span th:if="${usertype} eq '0'">老师</span>
									<span th:if="${usertype} eq '1'">学生</span>
									<span th:if="${usertype} eq '2'">管理员</span>

									<img th:if="${usertype} eq '0'" src="images/someicon/teacher.jpg" class="avatar img-fluid rounded me-1" alt="Charles Hall" /> 
									<img th:if="${usertype} eq '1'" src="images/someicon/student.jpg" class="avatar img-fluid rounded me-1" alt="Charles Hall" /> 
									<img th:if="${usertype} eq '2'" src="images/someicon/admin.jpg" class="avatar img-fluid rounded me-1" alt="Charles Hall" />
									<span class="text-dark" th:text="${usermail}"></span>
								</a>
								<div class="dropdown-menu dropdown-menu-end">
									<a class="dropdown-item" href="pages-profile.html"><i class="align-middle me-1" data-feather="user"></i> Profile</a>
									<div class="dropdown-divider"></div>
									<a class="dropdown-item" href="#">Log out</a>
								</div>
							</li>
						</ul>
					</div>
				</nav>
				
				<!--在这里写我自己的东西-->
			<section class="mainbox">
				<div class="container-fluid p-0">
					<div class="mb-3">
				
					</div>
					<div class="row">
						<div class="col-md-12">
							<div class="bigbox">
								<div class="typechoose">
										<div class="eachtype"></div>
										<div class="eachtype"></div>
										<div class="eachtype">
											<h1 style="margin-top:6px;">题目详情</h1>
										</div>
										<div class="eachtype"></div>
										<div class="eachtype"></div>
								</div>	
								<div class="forinput">
									<div class="subthing">题目id：</div>
									<div class="subthing">
										<p th:text="${qinfo.id}" style="font-weight:700;"></p>
									</div>
									<div class="subthing">学科：</div>
									<div class="subthing">
										<p th:text="${qinfo.subject}" style="font-weight:700;"></p>
										</div>
									<div class="subthing">
									</div>
									<div class="subthing">
									</div>	
								</div>
								<div class="forinput">
									<div class="subthing">分值：</div>
									<div class="subthing">
										<p th:text="${qinfo.point}" style="font-weight:700;">23</p>
									</div>
									<div class="subthing">难度：</div>
									<div class="subthing">
										<p th:text ="${qinfo.difficulty}" style="font-weight:700;"></p>
									</div>
									<div class="subthing"></div>
									<div class="subthing"></div>
								</div>
								<div class="forinput2">
									<div class="subthing">题干：</div>
									<div class="subthing">
										<p th:text="${qinfo.content}" style="margin-left:20px;margin-top:5px;"></p>
									</div>
									<div class="subthing"></div>
									<div class="subthing"></div>
								</div>
								<div th:if="${not #strings.isEmpty(qinfo.picture)}">
									<div class="forinput3">
										<div class="subtext">题目照片：</div>
										<div class="subpic">
											<img th:src="@{${qinfo.picture}}" width="100%">
										</div>
									</div>
								</div>
							
								<!-- 选择题要额外加选项 -->
								<div th:if ="${qtype} eq '0'">
									<div th:if ="${wshowall} eq '1'">
										<div class="forinput2">
											<div th:if="${qinfo.answer} eq 'A'" class="subthing">
												<input class="form-check-input" type="radio" checked>	
												<span class="form-check-label">A</span>
											</div>
											<div th:if="${qinfo.answer} ne 'A'" class="subthing">
												<input class="form-check-input" type="radio" >	
												<span class="form-check-label">A</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optiona}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div th:if="${qinfo.answer} eq 'B'" class="subthing">
												<input class="form-check-input" type="radio" checked>	
												<span class="form-check-label">B</span>
											</div>
											<div th:if="${qinfo.answer} ne 'B'" class="subthing">
												<input class="form-check-input" type="radio" >	
												<span class="form-check-label">B</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optionb}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div th:if="${qinfo.answer} eq 'C'" class="subthing">
												<input class="form-check-input" type="radio" checked>	
												<span class="form-check-label">C</span>
											</div>
											<div th:if="${qinfo.answer} ne 'C'" class="subthing">
												<input class="form-check-input" type="radio" >	
												<span class="form-check-label">C</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optionc}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div th:if="${qinfo.answer} eq 'D'" class="subthing">
												<input class="form-check-input" type="radio" checked>	
												<span class="form-check-label">D</span>
											</div>
											<div th:if="${qinfo.answer} ne 'D'" class="subthing">
												<input class="form-check-input" type="radio" >	
												<span class="form-check-label">D</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optiond}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
									<div th:if="${#strings.isEmpty(wshowall)}">
										<div class="forinput2">
											<div class="subthing">
												<input class="form-check-input" type="radio" name="stuanswer" value="A" form="doq">	
												<span class="form-check-label">A</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optiona}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div class="subthing">
												<input class="form-check-input" type="radio" name="stuanswer" value="B" form="doq">	
												<span class="form-check-label">B</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optionb}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div class="subthing">
												<input class="form-check-input" type="radio" name="stuanswer" value="C" form="doq">	
												<span class="form-check-label">C</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optionc}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
										<div class="forinput2">
											<div class="subthing">
												<input class="form-check-input" type="radio" name="stuanswer" value="D" form="doq">	
												<span class="form-check-label">D</span>
											</div>
											<div class="subthing">
												<p th:text="${qinfo.optiond}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
								</div>
								<!-- 判断题的答案是T or F -->
								<div th:if ="${qtype} eq '1'">
									<div class="forinput5">
										<div class="subthing">题目答案：</div>
										<div class="subthing">
											<div class="subsub">
												<div th:if="${#strings.isEmpty(wshowall)}">
													<input class="form-check-input" type="radio" name="stuanswer" value="T" form="doq">
												</div>
												<div th:if ="${wshowall} eq '1'">
													<div th:if="${qinfo.answer} eq 'T'">
														<input class="form-check-input" type="radio" checked="true">
													</div>
													<div th:if="${qinfo.answer} ne 'T'">
														<input class="form-check-input" type="radio" >
													</div>
												</div>
												<span class="form-check-label">正确</span>
											</div>
											<div class="subsub">
												<div th:if="${#strings.isEmpty(wshowall)}">
													<input class="form-check-input" type="radio" name="stuanswer" value="F" form="doq">
												</div>
												<div th:if ="${wshowall} eq '1'">
													<div th:if="${qinfo.answer} eq 'F'">
														<input class="form-check-input" type="radio" checked="true">
													</div>
													<div th:if="${qinfo.answer} ne 'F'">
														<input class="form-check-input" type="radio" >
													</div>
												</div>
												<span class="form-check-label">错误</span>
											</div>
											<div class="subsub"></div>
										</div>
										<div class="subthing"></div>
										<div class="subthing"></div>
										<div class="subthing"></div>
										<div class="subthing"></div>
										<div class="subthing"></div>
									</div> 
								</div>
								<div th:if="${not #strings.isEmpty(wshowall)}">
									<div th:if ="${qtype} ge '2'">
										<div class="forinput2">
											<div class="subthing">答案：</div>
											<div class="subthing">
												<p th:text="${qinfo.answer}" style="margin-left:20px;margin-top:5px;"></p>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
									<div th:if ="${qtype} eq '3'">
										<div class="forinput3" th:if="${not #strings.isEmpty(qinfo.answerpic)}">
											<div class="subtext">题目照片：</div>
											<div class="subpic">
												<img th:src="@{${qinfo.answerpic}}" width="100%">
											</div>
										</div>
									</div>
								</div>
								<div th:if="${#strings.isEmpty(wshowall)}">
									<div th:if ="${qtype} ge '2'">
										<div class="forinput2">
											<div class="subthing">答案：</div>
											<div class="subthing">
												<textarea cols="50" rows="6"  name="stuanswer" class="form-control" form="doq">输入标准答案</textarea>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
									<div th:if ="${qtype} eq '3'">
										<div th:if ="${qtype} eq '3'">
											<div class="forinput3x">
												<div class="subthing">答案照片：</div>
												<div class="subthing">
													<input type="file" name="stuanswerpic" class="form-control" form="doq">
												</div>
												<div class="subthing"></div>
												<div class="subthing"></div>
												<div class="subthing"></div>
												<div class="subthing"></div>
												<div class="subthing"></div>
											</div>
										</div>
									</div>
								</div>
								<div  style="display:none;" th:if ="${qtype} le '2'">
									上传我的作答照片：<input type="file" name="stuanswerpic" form="doq"><br/>
								</div>
								<div th:if ="${wshowalldo} eq '1'">
									<div th:if ="${qtype} le '2'">
										<div class="forfill">
											<div class="subsub">
												<p style="font-weight:700;">我的答案：</p>
											</div>
											<div class="subsub2">
												<p th:text="${stuanswer}"></p>
											</div>
											<div class="subsub"></div>
											<div class="subsub" th:if ="${myscore} gt '0'">
												<img src='/img/yes.png' style="width:50px;height:50px;margin-top:-15px">
											</div>
											<div class="subsub" th:if ="${myscore} eq '0'">
												<img src='/img/wrong.png' style="width:50px;height:50px;margin-top:-15px">
											</div>
											<div class="subsub"></div>
											<div class="subsub"></div>
											<div class="subsub"></div>
											<div class="subsub"></div>
										</div>
									</div>
									<div th:if ="${qtype} eq '3'">
										<div class="forbig">
											<div class="subsub">
												<p style="font-weight:700;">我的答案：</p>
											</div>
											<div class="subsub2">
												<p th:text="${stuanswer}"></p>
											</div>
											<div class="subsub"></div>
											<div class="subsub"></div>
										</div>
										<div class="forbig" th:if="${not #strings.isEmpty(stuanswerpic)}">
											<div class="subsub">
												<p style="font-weight:700;">标答照片：</p>
											</div>
											<div class="subsub2">
												<div class="forimg">
													<img th:src="@{${stuanswerpic}}" style="width: 100% ; height:100%">
												</div>	
											</div>
											<div class="subsub"></div>
											<div class="subsub"></div>
										</div>
									</div>
								</div>
								
								<div th:if="${#strings.isEmpty(wshowcomment)}">
									<div th:if ="${wshowalldo} eq '1'">
										<div class="forinput2">
											<div class="subthing">做题笔记：</div>
											<div class="subthing">
												<textarea cols="50" rows="6"  name="comment" class="form-control" form="docomment">输入笔记</textarea>
											</div>
											<div class="subthing"></div>
											<div class="subthing"></div>
										</div>
									</div>
								</div>	
								<div th:if ="${wshowcomment} eq '1'">
									<div class="forbig">
										<div class="subsub">
											<p style="font-weight:700;">我的笔记：</p>
										</div>
										<div class="subsub2">
											<p th:text="${comment}"></p>
										</div>
										<div class="subsub"></div>
										<div class="subsub"></div>
									</div>
								</div>
								<div class="forsubmit" th:if ="${usertype} lt '2'">
										<div class="eachtype"></div>
										<div class="eachtype" th:if ="${#strings.isEmpty(wshowall)}">
											<form action="/qdetail_showall" enctype='multipart/form-data' method='POST'>
												<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #00aa00;">
													<h3 style="margin-top:8px;">
														<font color="white">查看解析</font>
													</h3>
												</button>  
											</form>	
										</div>
										<div class="eachtype" th:if="${#strings.isEmpty(wshowcomment) and (wshowalldo == 1)}" >
											<form action="/qdetail_doq_doc" enctype='multipart/form-data' method='POST' id="docomment">
												<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #007c7c;">
													<h3 style="margin-top:8px;">
														<font color="white">记录笔记</font>
													</h3>
												</button>  
											</form>	
										</div>
										<div class="eachtype" th:if ="${#strings.isEmpty(wshowall) and (usertype<2)}">
											<form action="/qdetail_doq" enctype='multipart/form-data' method='POST' id="doq">
												<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #aa0000;">
													<h3 style="margin-top:8px;">
														<font color="white">作答题目</font>
													</h3>
												</button>
											</form>
										</div>
										<div class="eachtype" th:if="${#strings.isEmpty(wshowcomment) and (wshowalldo == 1)}">
											<form action="/backqbank" enctype='multipart/form-data' method='POST'>
												<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #550000;">
													<h3 style="margin-top:8px;">
														<font color="white">返回题库</font>
													</h3>
												</button>
											</form>
										</div>
										<div class="eachtype">
											
										</div>
										<div class="eachtype"></div>
									</div>
									<div class="forsubmit" th:if ="${usertype} eq '2'">
											<div class="eachtype"></div>
											<div class="eachtype" th:if ="${#strings.isEmpty(wshowall)}">
												<form action="/qdetail_showall" enctype='multipart/form-data' method='POST'>
													<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #00aa00;">
														<h3 style="margin-top:8px;">
															<font color="white">查看解析</font>
														</h3>
													</button>  
												</form>	
											</div>
											<div class="eachtype" th:if ="${not #strings.isEmpty(wshowall)}" >
												<form action="/backqbank" enctype='multipart/form-data' method='POST' id="docomment">
													<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #007c7c;">
														<h3 style="margin-top:8px;">
															<font color="white">返回题库</font>
														</h3>
													</button>  
												</form>	
											</div>
											<div th:if="${not #strings.isEmpty(newpass)}" class="eachtype">
												<div th:if="${(usertype==2) and (newpass==0)}">
													<form action="/check_q" enctype='multipart/form-data' method='POST' id="doq">
														<input type="hidden" name="pass" value=1>
														<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #005500;">
															<h3 >
																<font color="white">通过审核</font>
															</h3>
														</button>
													</form>
												</div>
											</div>
											<div th:if="${#strings.isEmpty(newpass)}" class="eachtype">
												<div th:if="${(usertype==2) and (qinfo.isok==0)}">
													<form action="/check_q" enctype='multipart/form-data' method='POST' id="doq">
														<input type="hidden" name="pass" value=1>
														<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #005500;">
															<h3 >
																<font color="white">通过审核</font>
															</h3>
														</button>
													</form>
												</div>
											</div>
											<div th:if="${not #strings.isEmpty(newpass)}" class="eachtype">
												<div th:if="${(usertype==2) and (newpass==1)}">
													<form action="/check_q" enctype='multipart/form-data' method='POST' id="doq">
														<input type="hidden" name="pass" value=0>
														<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #aa0000;">
															<h3 >
																<font color="white">驳回题目</font>
															</h3>
														</button>
													</form>
												</div>
											</div>
											<div th:if="${#strings.isEmpty(newpass)}" class="eachtype">
												<div th:if="${(usertype==2) and (qinfo.isok==1)}">
													<form action="/check_q" enctype='multipart/form-data' method='POST' id="doq">
														<input type="hidden" name="pass" value=0>
														<button type="submit" style="width: 120px; height: 40px; border-radius: 20%;border: none;background-color: #aa0000;">
															<h3 >
																<font color="white">驳回题目</font>
															</h3>
														</button>
													</form>
												</div>
											</div>
								
											<div class="eachtype">
												
											</div>
											<div class="eachtype"></div>
										
									</div>	
								</div>	
								
						</div>
				
			</section>
				
				<footer class="footer">
					<div class="container-fluid">
						<div class="row text-muted">
							<div class="col-6 text-start">
								<p class="mb-0">
									<a class="text-muted" href="https://adminkit.io/" target="_blank"><strong>AdminKit</strong></a> &copy;
								</p>
							</div>
							<div class="col-6 text-end">
								<ul class="list-inline">
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Support</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Help Center</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Privacy</a>
									</li>
									<li class="list-inline-item">
										<a class="text-muted" href="https://adminkit.io/" target="_blank">Terms</a>
									</li>
								</ul>
							</div>
						</div>
					</div>
				</footer>
			</div>
		</div>
		
		<script src="js/app.js"></script>
	</body>
</html>
